package com.mxpio.webapp.entity;

import com.mxpioframework.jpa.annotation.Generator;
import com.mxpioframework.security.entity.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.ToString;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * 网络信息表
 *
 * @author: Cheng
 * @date: 2022/10/31
 */

@Entity
@Table(name = "MI_MONITOR_NET")
@Schema(description = "网络信息表")
@Data
@ToString
public class MonitorNet extends BaseEntity {

    @Id
    @Generator
    @Schema(description = "主键ID")
    @Column(name = "ID", length = 64)
    private String id;

    @Schema(description = "IP地址（来源）")
    @Column(name = "IP_SOURCE")
    private String ipSource;

    @Schema(description = "IP地址（目的地）")
    @Column(name = "IP_TARGET")
    private String ipTarget;

    @Schema(description = "IP地址描述")
    @Column(name = "IP_DESC")
    private String ipDesc;

    @Schema(description = "状态（0：网络不通，1：网络正常）")
    @Column(name = "STATUS")
    private String status;

    @Schema(description = "平均响应时间（毫秒）")
    @Column(name = "AVG_TIME")
    private Double avgTime;

    @Schema(description = "离线次数")
    @Column(name = "OFFLINE_COUNT")
    private Integer offlineCount;

    @Schema(description = "监控环境")
    @Column(name = "MONITOR_ENV")
    private String monitorEnv;

    @Schema(description = "监控分组")
    @Column(name = "MONITOR_GROUP")
    private String monitorGroup;
}
